import Link from "./link";
import React from "react";
import { useLocation } from "react-router-dom";

const Navigation = () => {
  const location = useLocation();

  if (location.pathname !== "/") {
    return null;
  }

  return (
    <ul>
      <li>
        <Link to="/">Root</Link>
      </li>
      <li>
        <Link to="/reports">Report List</Link>
      </li>
      <li>
        <Link to="/report/1">Report Detail</Link>
      </li>
      <li>
        <Link to="/warranty">Warranty Brochure Detail</Link>
      </li>
      <li>
        <Link to="/tutorials">Tutorial List</Link>
      </li>
      <li>
        <Link to="/tutorial/a">Tutorial Detail</Link>
      </li>
    </ul>
  );
};

export default Navigation;
